/*
Copyright [2023] [fuwen_soft]
*/
package vip.xiaonuo.modular.xylogy.form;

import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;

import javax.validation.constraints.NotBlank;
import java.util.List;

import static vip.xiaonuo.modular.xylogy.enums.XyLogyAuthEnum.*;

/**
 * 族谱书
 *
 * @author yanwei
 * @date 2023-05-05 15:44:28
 */
@Data
@ApiModel("新协作家谱提交表单")
public class LogyAuthNewForm extends BaseEntity {

    /**
     * 家谱编号
     */
    @Excel(name = "家谱编号")
    @ApiModelProperty(value = "家谱编号")
    @NotBlank(message = "家谱编号不可为空" )
    private String logyId;


    /**
     * 协作者手机号
     */
    /**
     * 协作者手机号
     */
    @Excel(name = "协作者手机号")
    @ApiModelProperty(value = "协作者手机号")
    @NotBlank(message = "协作者手机号不可为空" )
    private String phone;


    /**
     * 协作者手机号
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    @NotBlank(message = "备注不可为空" )
    private String remark;



    /**
     * 家谱编号
     */
    @Excel(name = "权限选择")
    @ApiModelProperty(value = "权限选择;1=管理员，2=协作者，3=绑定人的权限标识 ",notes = "权限选择")
   // @NotBlank(message = "族员编号不可为空" )
    private Integer authOther;



    public String tranF(){
        if (Integer.valueOf(1).equals(this.authOther))
            return ALL_ADMIN_AUTH.getAuthP();
        else if(Integer.valueOf(2).equals(this.authOther))
            return ALL_ADMIN_PUTONG_AUTH.getAuthP();
        else
            return ALL_PUTONG_AUTH.getAuthP();
    }







}
